package example.chapter6;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.List;

import com.opensymphony.xwork2.ActionSupport;

import example.model.Seminar;

public class SeminarAction extends ActionSupport{
	private List<Seminar> listSeminar;
	
	public String seminarInfo() throws Exception{
		String template = "yyyy-MM-dd";
		SimpleDateFormat df = new SimpleDateFormat(template);
		listSeminar = new ArrayList<Seminar>();
		
		listSeminar.add(new Seminar("JF001", "Struts2", "Hyun C.J", df.parse("2007-07-15"), "02 PM", "05 PM", true));
		listSeminar.add(new Seminar("JF002", "iBatis", "Jung K.S", df.parse("2007-07-29"), "04 PM", "06 PM", true));
		listSeminar.add(new Seminar("JP001", "Java Pattern", "Min S.G", df.parse("2007-08-04"), "10 AM", "02 PM", false));
		listSeminar.add(new Seminar("JF003", "Acegi", "Jung J.Y", df.parse("2007-08-15"), "01 PM", "02 PM", false));
		listSeminar.add(new Seminar("AC001", "SOA Introduction", "Kim T.W", df.parse("2007-08-21"), "08 AM", "11 AM", false));
		
		return SUCCESS;
	}

	public List<Seminar> getListSeminar() {
		return listSeminar;
	}

	public void setListSeminar(List<Seminar> listSeminar) {
		this.listSeminar = listSeminar;
	}
	
}
